﻿//===================================================================================
// Copyright (c) Ryan Garrett.  All rights reserved.
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS FOR A PARTICULAR PURPOSE.
//===================================================================================

using System;

namespace Caffeine.Core.Test.TestModel
{
    public class ModelForPropertyChangeCountTesting : ModelBase
    {
        private readonly ModelProperty<ModelForPropertyChangeCountTesting> _childProperty;
        private readonly ModelProperty<String> _stringProperty;
        private readonly ModelProperty<Nullable<Decimal>> _decimalProperty;

        public ModelForPropertyChangeCountTesting()
        {
            _childProperty = RegisterProperty<ModelForPropertyChangeCountTesting>("ChildProperty");
            _stringProperty = RegisterProperty<String>("StringProperty");
            _decimalProperty = RegisterProperty<Nullable<Decimal>>("DecimalProperty", ModelBase.StandardBehaviors.RemoveBehavior(ModelPropertyBehaviors.SupportsPropertyChangeCounting));
        }

        public ModelProperty<ModelForPropertyChangeCountTesting> ChildProperty
        {
            get
            {
                return _childProperty;
            }
        }

        public ModelProperty<String> StringProperty
        {
            get
            {
                return _stringProperty;
            }
        }

        public ModelProperty<Nullable<Decimal>> DecimalProperty
        {
            get
            {
                return _decimalProperty;
            }
        }
    }
}
